package com.example.demo.mapper;

import com.example.demo.entity.PmCompeteManager;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PmCompeteManagerMapper extends BaseMapper<PmCompeteManager> {
    @Select("select * from pm_compete_manager where employee_id = #{employeeId} ")
    List<PmCompeteManager> get(Long employeeId);

    @Select("select * " +
            "from pm_compete_manager WHERE id in " +
            "(select max(id) from pm_compete_manager where start_time <= #{endDate} and start_time >= #{startDate} and company like #{company} group by employee_id) ")
    List<PmCompeteManager> excel(String startDate, String endDate, String company);

}




